package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;

import android.R.integer;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ykdl.member.kid.models.FileMetas;

import net.wxxr.http.interfaces.IJsonParser;

public class TopicAndPostBean implements Serializable ,IJsonParser{

	/**
	 * 解析帖子及其回复的类
	 *  "post_time": 发布时间
        "source_id": 来源id,如果是圈子，即为圈子id
        "source": 来源
        "topic_id": 所属TOPIC标识
        "parent_id": 二级回复标识
        "layer”: 楼层
        "post_actor_display_name": 发贴人名称
        "post_actor_id": post.post_actor_id 发帖人标识
        "message”: 内容
        "has_image": 是否有图片
        "file_ids": 附件标识
        "display_order": 保留
        "is_anonymous”: 是否匿名
        "is_topic": 是否是主题
        "extra_data": 额外信息 { “baby_days”: 宝宝生日,"parent_post_actor_name": 二级回复目标actor名字
                "parent_post_content": 二级回复帖子内容
}
“post_actor”: actor类
“file_metas”: 附件
“likes_count”：赞数
“is_like”: 当前用户是否已赞

	 * 
	 */
	private static final long serialVersionUID = 3023835499740692047L;
	private String post_time ;//发帖时间
	private int source_id ;
	private String source ;//来源
	private int topic_id ;
	private int layer ;//楼层数
	private String  post_actor_display_name ;
	private int post_actor_id ;
	private String message ;//帖子内容
	private boolean has_image ;//是否帖子有图片
	private int display_order ;//#>0为置顶,<0不显示,==0正常   -1为回收站   -2待审核 -3为被忽略
	private String is_anonymous ;
	private boolean is_topic ;
	private ExtraDataBean extra_data ;
	private UserActorBean post_actor ;
	private ArrayList<FileMetas> file_metas ;
	private int likes_count ;
	private boolean is_like ;
	private int parent_id = 0 ;//大于0即为有二次回复
	private int post_id ;//id
	private String error ;
	private Listinfobean group ;
	private String favorites_count ;
	private boolean is_favorite ;
	private String title;
	private String desc ;
	public String getDesc() {
		return desc;
	}

	public String getTitle() {
		return title;
	}

	public String getFavorites_count() {
		return favorites_count;
	}

	public boolean isIs_favorite() {
		return is_favorite;
	}

	public String getPost_time() {
		return post_time;
	}

	public int getSource_id() {
		return source_id;
	}

	public String getSource() {
		return source;
	}

	public int getTopic_id() {
		return topic_id;
	}

	public int getLayer() {
		return layer;
	}

	public String getPost_actor_display_name() {
		return post_actor_display_name;
	}

	public int getPost_actor_id() {
		return post_actor_id;
	}

	public String getMessage() {
		return message;
	}

	public boolean isHas_image() {
		return has_image;
	}

	public int getDisplay_order() {
		return display_order;
	}

	public String getIs_anonymous() {
		return is_anonymous;
	}

	public boolean isIs_topic() {
		return is_topic;
	}

	public ExtraDataBean getExtra_data() {
		return extra_data;
	}

	public UserActorBean getPost_actor() {
		return post_actor;
	}

	public ArrayList<FileMetas> getFile_metas() {
		return file_metas;
	}

	public int getLikes_count() {
		return likes_count;
	}

	public boolean isIs_like() {
		return is_like;
	}

	public int getParent_id() {
		return parent_id;
	}

	public int getPost_id() {
		return post_id;
	}

	public String getError() {
		return error;
	}

	public Listinfobean getGroup() {
		return group;
	}

	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, TopicAndPostBean.class);
		}
		return null;
	}

}
